package com.eonmind.ai;

import com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeAutoConfiguration;
import com.eonmind.common.contract.exception.handler.GlobalExceptionHandler;
import com.mongoplus.annotation.MongoMapperScan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;

@Slf4j
@EnableScheduling
@EnableFeignClients(basePackages = {"com.eonmind"})
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = {"com.eonmind.ai", "com.eonmind.common"},
        exclude = {DashScopeAutoConfiguration.class, OpenAiAutoConfiguration.class})
@MongoMapperScan("com.eonmind.ai.mapper")
@Import(GlobalExceptionHandler.class)
public class AiApplication {
    public static void main(String[] args) {
        SpringApplication.run(AiApplication.class, args);
        log.info("AiApplication started");
    }
}
